import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

import '../css/main.dart';

import 'view.dart';

class YaxiPage extends StatefulWidget {
  YaxiPage(CSSNodeData data) : super(key: ValueKey(data.uuid));

  @override
  State<StatefulWidget> createState() {
    return YaxiPageState();
  }
}

class YaxiPageState extends State<YaxiPage> {
  @override
  Widget build(BuildContext context) {
    var data = CSSNodeData();

    data.isRepaintBoundary = true;
    data.children = [
      CSSNodeData.init((data) {
        data.uuid = 2;
        data.type = 'Text';
      }),
      CSSNodeData.init((data) {
        data.uuid = 3;
        data.type = 'Text';
      }),
      CSSNodeData.init((data) {
        data.uuid = 4;
        data.type = 'Text';
      }),
    ];

    return Padding(padding: EdgeInsets.zero, child: YaxiView(data));
  }
}
